﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GoodMan.Infrastructure.Entities.Enum
{
    public static class EnumMapping
    {
        public static string Mapping(this Gender gender)
        {
            switch (gender)
            {
                case Gender.Female:
                    return "女士";
                default:
                case Gender.Male:
                    return "先生";
            }
        }
        public static string Mapping(this UserRole userRole)
        {
            switch (userRole)
            { 
                case UserRole.Admin:
                    return "超级管理员";
                case UserRole.CollegeAdmin:
                    return "学校管理员";
                case UserRole.FinancialOfficer:
                    return "超级财务管理员";
                default:
                case UserRole.Member:
                    return "会员";
                case UserRole.Officer:
                    return "财务管理员";
                case UserRole.Staff:
                    return "楼栋管理员";
            }
        }

        public static string Mapping(this OrderStatus orderStatus)
        {
            switch (orderStatus)
            {
                case OrderStatus.Reserved:
                    return "预订完成";
                case OrderStatus.Paid:
                    return "支付完成";
                case OrderStatus.WaitForDeliver:
                    return "等待发货";
                default:
                case OrderStatus.Completed:
                    return "交易完成";
                case OrderStatus.Cancelled:
                    return "取消交易";
            }
        }

        public static string Mapping(this PayWay payway)
        {
            switch (payway)
            {
                case PayWay.Online:
                    return "在线支付";
                default:
                case PayWay.Cash:
                    return "货到付款";
                
            }
        }

        public static string Mapping(this RefundStatus refundstatus)
        {
            switch (refundstatus)
            {
                case RefundStatus.ApplyRefund:
                    return "申请退款";
                default:
                case RefundStatus.ConfirmRefund:
                    return "退款完成";
                case RefundStatus.RefuseRefund:
                    return "拒绝退款";
            }
        }

        public static string Mapping(this AreaCode areaCode)
        {
            switch (areaCode)
            { 
                case AreaCode.Combination:
                    return "套餐商品";
                case AreaCode.Group:
                    return "团购商品";
                case AreaCode.Integration:
                    return "积分商品";
                default:
                case AreaCode.Normal:
                    return "普通商品(特卖商品）";
                case AreaCode.Snack:
                    return "快餐";
            }
        }
    }
}
